Skip to content

Datetime: Tidy up docs#144720

Merged
encukou merged 4 commits intopython:mainfrom
StanFromIreland:datetime/docs-tidy-up
Feb 18, 2026
Merged

Datetime: Tidy up docs#144720
encukou merged 4 commits intopython:mainfrom
StanFromIreland:datetime/docs-tidy-up

Conversation

@StanFromIreland
Copy link
Member

@StanFromIreland StanFromIreland commented Feb 11, 2026

Fix some style guide infringements (case of titles, Latin abbreviations), add parameter mark up in a few places, fix a small typo, make spacing of docs consistent, and add an inheritance diagram (like pathlib's :-).

Diagram

Generated with graphviz, and:

digraph {
    graph [
        bgcolor="transparent"
        fontnames = "svg"
        layout="dot"
        ranksep=0.5
        nodesep=0.5
        splines=line
    ]
    node [
        fontname="Courier"
        fontsize=14.0
        shape=box
        style=rounded
        margin="0.15,0.07"
    ]
    edge [
        arrowhead=none
    ]
    object -> tzinfo
    object -> timedelta
    object -> time
    object -> date
    tzinfo -> timezone
    date -> datetime
}

📚 Documentation preview 📚: https://cpython-previews--144720.org.readthedocs.build/en/144720/library/datetime.html

StanFromIreland and others added 2 commits February 12, 2026 08:11
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diagram in pathlib is useful as the inheritance is non-standard. I don't think that's the case here, perhaps the only such instance is date <- datetime. What's the justification for adding it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the justification for adding it?

The diagram is already in the documentation, albeit in textual form.

@AA-Turner
Copy link
Member

feedback: this PR could have been more usefully structured as an optional set of style guide changes, addition of markup, and adding an image; to allow discussing each on its own merits.

Probably not worth doing now that this has been opened, but please keep in mind for the future.

A

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@StanFromIreland
Copy link
Member Author

Thanks Hugo!

@encukou encukou merged commit c6a142f into python:main Feb 18, 2026
29 checks passed
@miss-islington-app
Copy link

Thanks @StanFromIreland for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @StanFromIreland and @encukou, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker c6a142f9472f2d3e2c360b72a19450f9dd087657 3.14

@StanFromIreland StanFromIreland deleted the datetime/docs-tidy-up branch February 18, 2026 13:36
StanFromIreland added a commit to StanFromIreland/cpython that referenced this pull request Feb 18, 2026
(cherry picked from commit c6a142f)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Feb 18, 2026

GH-144956 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Feb 18, 2026
encukou pushed a commit that referenced this pull request Feb 18, 2026
(cherry picked from commit c6a142f)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments